<div data-am-widget="tabs" data-am-tabs="{noSwipe: 1}" class="am-tabs am-tabs-default">
    <ul class="am-tabs-nav am-cf">
        <li class="am-active"><a href="#">整合</a></li>
        <li class=""><a href="#">第一球</a></li>
        <li class=""><a href="#">第二球</a></li>
        <li class=""><a href="#">第三球</a></li>
        <li class=""><a href="#">第四球</a></li>
        <li class=""><a href="#">第五球</a></li>
    </ul>
    <div class="am-tabs-bd">
        <div data-tab-panel-0 class="am-tab-panel am-active">
            <table class="zonghe container">
                <thead>
                    <tr>
                        <th colspan="4">总和-龙虎和</th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
            <ul class="am-avg-sm-5 five">
            </ul>

            <table class="qiansan container">
                <thead>
                    <tr>
                        <th colspan="9">前三</th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
            <table class="zhongsan container">
                <thead>
                    <tr>
                        <th colspan="9">中三</th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
            <table class="housan container">
                <thead>
                    <tr>
                        <th colspan="9">后三</th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
        <div data-tab-panel-1 class="am-tab-panel ">
            <table class="danhao1 container">
                <tbody>
                </tbody>
            </table>
        </div>
        <div data-tab-panel-2 class="am-tab-panel ">
            <table class="danhao2 container">
                <tbody>
                </tbody>
            </table>
        </div>
        <div data-tab-panel-3 class="am-tab-panel ">
            <table class="danhao3 container">
                <tbody>
                </tbody>
            </table>
        </div>
        <div data-tab-panel-4 class="am-tab-panel ">
            <table class="danhao4 container">
                <tbody>
                </tbody>
            </table>
        </div>
        <div data-tab-panel-5 class="am-tab-panel ">
            <table class="danhao5 container">
                <tbody>
                </tbody>
            </table>
        </div>
    </div>
    <button class="save am-btn-xl am-btn-primary">保存</button>
</div>

<script>
    var tables = $(".zonghe tbody");
    for (var z = 0; z < tables.length; z++) {
        var table = $(tables[z]);
        table.empty();

        var types = ["大", "小", "单", "双"];
        var tr = $("<tr></tr>");
        for (var i = 0; i < types.length; i++) {
            var t = types[i];
            AdminLimit.add('和' + t, '总和' + t, tr);
        }
        table.append(tr);

        var tr = $("<tr class='lhh'></tr>");
        var types = ["龙", "虎", "和"];
        for (var i = 0; i < types.length; i++) {
            var t = types[i];
            AdminLimit.add(t, t, tr);
        }
        tr.append("<td> </td>");
        table.append(tr);
    }

    // 前三
    var types = ['豹子', '顺子', '对子', '半顺', '杂六'];
    var tables = $(".qiansan tbody");
    for (var z = 0; z < tables.length; z++) {
        var table = $(tables[z]);
        table.empty();

        var tr = $("<tr></tr>");
        for (var i = 0; i < types.length; i++) {
            var t = types[i];
            AdminLimit.add("前" + t[0], t, tr);
        }
        table.append(tr);
    }

    // 中三
    var tables = $(".zhongsan tbody");
    for (var z = 0; z < tables.length; z++) {
        var table = $(tables[z]);
        table.empty();

        var tr = $("<tr></tr>");
        for (var i = 0; i < types.length; i++) {
            var t = types[i];
            AdminLimit.add("中" + t[0], t, tr);
        }
        table.append(tr);
    }

    // 后三
    var tables = $(".housan tbody");
    for (var z = 0; z < tables.length; z++) {
        var table = $(tables[z]);
        table.empty();

        var tr = $("<tr></tr>");
        for (var i = 0; i < types.length; i++) {
            var t = types[i];
            AdminLimit.add("后" + t[0], t, tr);
        }
        table.append(tr);
    }

    // 填充单号
    var tables = [$(".danhao1 tbody"), $(".danhao2 tbody"), $(".danhao3 tbody"), $(".danhao4 tbody"), $(".danhao5 tbody")]
    var ths = ["第一球", "第二球", "第三球", "第四球", "第五球"];
    var arr = ['一', '二', '三', '四', '五'];
    var types = ["大", "小", "单", "双"];

    // 0~9球的数字
    for (var z = 0; z < tables.length; z++) {
        var table = tables[z];
        table.empty();
        var tr = $("<tr></tr>");
        for (var i = 0; i <= 9; i++) {
            AdminLimit.add(arr[z] + i, i, tr);
            if (i == 4) {
                table.append(tr);
                tr = $("<tr></tr>");
                continue;
            }
            if (i == 9) {
                table.append(tr);
            }
        }

        // 大小单双
        var tr = $("<tr class='dxds'></tr>");
        for (var i = 0; i < types.length; i++) {
            var t = types[i];
            AdminLimit.add(arr[z] + t, t, tr);
        }
        tr.append("<td> </td>");
        table.append(tr);
    }
</script>
